/*+**************************************************************************/
/***                                                                      ***/
/***   Copyright (C) by Dierk Ohlerich                                    ***/
/***   all rights reserved                                                ***/
/***                                                                      ***/
/***   To license this software, please contact the copyright holder.     ***/
/***                                                                      ***/
/**************************************************************************+*/

asc
{
  cbuffer DefaultVSPara : register(c0) : slot vs 0
  {
    row_major float4x4 mvp;     // rotation for light vector (not really needed)
  };
}

material AlphaMtrl
{
  vs
  {
    asc vs_3_0                 // hlsl code
    {
      use DefaultVSPara;
      void main
      (
        in float3 in_pos : POSITION,
        in float2 in_uv0 : TEXCOORD0,
        out float2 out_uv0 : TEXCOORD0,
        out float4 out_pos : POSITION, 
      )
      {
        out_uv0 = in_uv0;
        out_pos = mul(float4(in_pos,1),mvp);
      }
    }
  }

  ps
  {
    asc ps_3_0
    {
      sampler2D s0 : register(s0);

      void main
      (
        in float2 uv0 : TEXCOORD0,
        out float4 result : COLOR0
      )
      {
        result.xyz = tex2D(s0,uv0).w;
        result.w = 1;
      }
    }    
  }
};
